<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<jsp:include page="template-header.jsp" />
<h1>Veranstaltungen</h1>

<c:choose>
	<c:when test="${events.size()>0}">
		<c:forEach items="${events}" var="event">
			<div class="content_item" onclick="location.href='event.html?id=${event.id}';">
				<div class="right">${event.begin}<br>${event.getLocname()}</div>
				<div class="title">${event.name}</div>
				<div>${event.artists}</div>
			</div>
		</c:forEach>
	</c:when>
	<c:otherwise>
		Leider sind derzeit keine Veranstaltungen eingetragen.
	</c:otherwise>
</c:choose>

<c:if test="${pevents.size()>0}">
<h1>Vergangene Veranstaltungen</h1>
<c:forEach items="${pevents}" var="pevent">
	<div class="content_item" onclick="location.href='event.html?id=${pevent.id}';">
		<div class="right">${pevent.begin}<br>${pevent.getLocname()}</div>
		<div class="title">${pevent.name}</div>
		<div>${pevent.artists}</div>
	</div>
</c:forEach>
</c:if>

<jsp:include page="template-footer.jsp" />
